The present invention relates to a method of gradation reproduction for reproducing gradation of multi-valued color images applicable to printers, image scanners, photocopiers, facsimiles, and the like apparatuses.
As one of the methods of gradation reproduction for multi-valued images, there exists now an error diffusion method. FIG. 9 is a block diagram depicting the error diffusion method. In the figure, a multi-valued data xe2x80x9cDxe2x80x9d of an observing pixel subject to a binarization transaction is read from an image memory 1, and it is xcex3-corrected into a multi-valued data xe2x80x9cDxe2x80x2xe2x80x9d suitable for a printing characteristic of an output apparatus such as a printer with reference being made to a corrective data stored in a xcex3-correction ROM 2. The xcex3-corrected multi-valued data xe2x80x9cDxe2x80x2xe2x80x9d is added with an error data xe2x80x9cExe2x80x9d for the observing pixel by an adder 3 within an error diffusion device 8, and a data F=Dxe2x80x2+E is produced.
In a subsequent comparator 5, the data xe2x80x9cFxe2x80x9d of the observing pixel, to which the error data xe2x80x9cExe2x80x9d is added, is compared with a binarization threshold value xe2x80x9cThxe2x80x9d. The comparator 5 outputs a binary signal B=xe2x80x9c1xe2x80x9d, if the data Fxe2x89xa7Th, or a binary signal B=xe2x80x9c0xe2x80x9d, if the data F less than Th. Based on the above output, a binarization error xe2x80x9cExe2x80x2xe2x80x9d for a binarization transaction is calculated as Exe2x80x2=Fxe2x88x92Bxe2x80x2, and it is output by a subtracter 7. In this instance, the value xe2x80x9cBxe2x80x2xe2x80x9d is derived as Bxe2x80x2=Bxc3x97255, if the input data has a gradation of 256 steps from 0 to 255. Accordingly, when an input multi-valued data xe2x80x9cDxe2x80x9d and a binarization threshold value xe2x80x9cThxe2x80x9d are given as D=230 and Th=128, for instance, an output data xe2x80x9cBxe2x80x9d after binarization and a binarization error xe2x80x9cExe2x80x2xe2x80x9d respectively become as follows:
B=1
Exe2x80x2=Fxe2x88x92Bxc3x97255=230xe2x88x921xc3x97255=xe2x88x9225.
The above binarization error xe2x80x9cExe2x80x9d is stored in an error storage means 4 so that it is distributed to data of pixels being transacted thereafter according to a predetermined error matrix xe2x80x9cMxyxe2x80x9d in a weighting error calculator 6. The binarization error xe2x80x9cExe2x80x9d is then added to a multi-valued data of a succeeding pixel by the adder 3, and the error data is transferred. In the above example, in which the input multi-valued data is given as D=230, an error of 25 occurs against the input data of 230, since the value xe2x80x9cBxe2x80x2xe2x80x9d becomes 255 out of the 256 steps of gradation, because the output data xe2x80x9cBxe2x80x9d after binarization is 1 as a result of comparison with the binarization threshold value Th=128. Therefore, the error of 25 corresponding to the input D=230 is chosen as the binarization error, and this error is distributed by the weighting error calculator 6 to the error storage unit 4 for unprocessed pixels by using the error matrix, so as to reflect it in the binarizing transaction of the succeeding pixels.
An example of the error matrix xe2x80x9cMxyxe2x80x9d is shown in FIG. 10. In FIG. 10, a pixel shown with a mark xe2x80x9c*xe2x80x9d represents the presently observing pixel, for which a binarizing transaction is made. An error that occurs when this observing pixel is binarized is distributed to the succeeding unprocessed pixels according to weighting factors (7, 1, 5 and 3) shown in the figure. When binarizing the observing pixel marked by the xe2x80x9c*xe2x80x9d, an error distribution value stored in the error storage unit 4 is read, and a succeeding input data read from the image memory 1 is corrected with this error distribution value.
As has been described, the error diffusion method is a means to distribute a binarization error, which occurs when a given pixel is binarized, to the succeeding pixels being binarized, to minimize error of the image data after binarization from the original multi-valued image data.
However, the foregoing transaction has some problems associated with printed images in that their quality degrades after the transaction, such as reduction in graininess and tone reproducibility, degradation in image quality around the edge, emergence of moire, and the like.
The present invention is intended to solve the above-cited problems, and to provide a means capable of improving graininess, tone reproducibility and image reproducibility in the edge, and elimination of moire in the output images after transaction of tone modulation.
A method of gradation reproduction of the present invention is characterized by controlling both size and density of output dots of a reproduced image, after the gradation process of an input image, by way of varying a number of the output dots, in order to solve the above problems.
During the foregoing transaction of determining size of the output dots, a distinctive character of the input image is extracted, and the dot size is determined based on the extracted character.
Also, the aforementioned character extraction is made for an edge region of the images.
Further, the dots to be output for the region where extraction is made at the edge is made smaller in size than dots for other regions.
In order to realize the foregoing object, the method of gradation reproduction comprises the steps of:
(a) obtaining image data of a pixel subject to transaction, as observing pixel data;
(b) adding weighting data to the observing pixel data, where the weighting data is calculated through a weighting process of error data derived from a previously transacted neighboring pixel of the observing pixel with an error distribution matrix;
(c) obtaining data of a pixel neighboring the observing pixel;
(d) calculating a density gradient around the observing pixel from the observing pixel data and the neighboring pixel data, and determining from the calculated density gradient whether the pixel lies in an edge region of the image;
(e) determining dot size data by comparing the weighted observing pixel data with a threshold value corresponding to an individual dot size, and selecting a predetermined dot size if the weighted observing pixel data lies in the edge region;
(f) producing an output of dot data by determining a dot of the observing pixel as dot coordinates, if the dot size data is greater than the threshold value for coordinates determination by comparing the dot size data with the threshold value; and
(g) calculating error data from the observing pixel data, the dot size data and the dot coordinates, and storing it for use as error data in a transaction of the succeeding pixel.
The foregoing method improves reproducibility of gradation, since it varies diameter of the dot in a number of steps. Furthermore, since the method controls coordinates of the dots in a manner to avoid having them arranged side by side along the horizontal and vertical scanning directions, it can prevent moire from emerging.